package teach.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import teach.aistar.mapper.OrderMapper;
import teach.aistar.model.entity.Orders;
import teach.aistar.service.IOrderService;

import java.util.Date;
import java.util.List;

@Service
@Transactional
public class OrderServiceImpl implements IOrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Orders> selectOrderAll() {
        return orderMapper.selectOrderAll();
    }

    @Override
    public int deleteById(int id) {
        return orderMapper.deleteById(id);
    }

    @Override
    public int saveOrder(String orderNo, String uName, String orderStatus, Long secId,Date time,Double price) {
       return orderMapper.saveOrder(orderNo,uName,orderStatus,secId,time,price);
    }
}
